#pragma once

#include "ScriptCompiler/AST/ExpressionNode.h"
#include "ScriptCompiler/AST/SentenceNode.h"

class CSentenceBlockNode;

class CDoWhileNode : public CSentenceNode
{
public:
    CDoWhileNode(std::weak_ptr<CScriptFileContext> InFile)
        : CSentenceNode(InFile, EASTNodeType::DoWhile)
    {
    }

    std::shared_ptr<CScriptToken> Do;

    //condition
    std::shared_ptr<CExpressionNode> Condition;

    //body
    std::shared_ptr<CSentenceBlockNode> Body;

    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return Do; }

};